package com.example.controller;

import com.example.pojo.OperateLog;
import com.example.pojo.PageResult;
import com.example.pojo.Result;
import com.example.service.EmpLogService;
import com.example.service.OperateLogService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: Sun
 * @Date: 2025/9/28 - 09 - 28 - 13:31
 * @Description: com.example.controller
 */
@RequestMapping
@RestController
public class OperateLogController {
    @Autowired
    private OperateLogService operateLogService;
    @GetMapping("/log/page")
    public Result page(@RequestParam(defaultValue = "1") Integer pageNum,
                       @RequestParam(defaultValue = "10") Integer pageSize){
        PageResult<OperateLog> pageResult = operateLogService.page(pageNum,pageSize);
        return Result.success(pageResult);

    }
}
